package net.superdvach.content;

public class ContentManipulator {

	public ContentManipulator(ContentStorage storage) {
		m_storage = storage;
	}
	
	public ItemThread getThread(ItemID id) {
		Item item = m_storage.loadItem(id);
		if(item instanceof ItemThread)
			return (ItemThread)item;
		else
			return null;
	}
	
	public ItemPost getPost(ItemID id) {
		Item item = m_storage.loadItem(id);
		if(item instanceof ItemPost)
			return (ItemPost)item;
		else
			return null;
	}

	public void storeItem(Item item) {
		m_storage.storeItem(item);	
	}
	
	private ContentStorage m_storage;
	
}
